/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.scm.hibernate.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Table(name="lectures")
@Entity
public class Lecture extends AbstractEntity{
    @Id
    @GeneratedValue
    @Column(name = "id")
    private Long id;
    
    @Column(name = "fid")
    private Long fid;
    
    @Column(name = "divid")
    private Long divid;
    
    @Column(name = "subid")
    private Long subid;
    
    @Transient 
    private Subject sub;
     
    
    @Column(name = "ldate")
    private String ldate;
    
    @Column(name = "ltime")
    private String ltime;

    
    
    public Subject getSub() {
        return sub;
    }

    public void setSub(Long subid) {
        this.sub = (Subject)new Subject().getById(subid);
    }
    
    
    
    

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getFid() {
        return fid;
    }

    public void setFid(Long fid) {
        this.fid = fid;
    }

    public Long getDivid() {
        return divid;
    }

    public void setDivid(Long divid) {
        this.divid = divid;
    }

    public Long getSubid() {
        return subid;
    }

    public void setSubid(Long subid) {
        this.subid = subid;
    }

    public String getLdate() {
        return ldate;
    }

    public void setLdate(String ldate) {
        this.ldate = ldate;
    }

    public String getLtime() {
        return ltime;
    }

    public void setLtime(String ltime) {
        this.ltime = ltime;
    }
   
}
